package com.tuling.code.socket;

import java.io.OutputStream;
import java.net.Socket;

import org.apache.commons.io.IOUtils;

public class ClientTest {
	public static void main(String[] args) {
		try{
			Socket socket = new Socket("10.229.15.222", 2189);
			System.out.println("连接上FRID");
			OutputStream out = socket.getOutputStream();
			out.write("read".getBytes());
			out.flush();
			System.out.println("发送read");
			System.out.println("aaaa" + IOUtils.toString(socket.getInputStream()));
		} catch(Exception e){
			e.printStackTrace();
		}
	}
}
